import requests
import pytest

@pytest.fixture(scope="session")
def test_login():
    logindata={"username":"qiaofeng","password":123}
    head={"Content-Type":"application/x-www-form-urlencoded"}
    r=requests.post("http://124.222.181.200:8081/login",headers=head,data=logindata,timeout=2)
    cookie=requests.utils.dict_from_cookiejar(r.cookies)
    return cookie['JSESSIONID']
